home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_ambswitch1.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_AmbSwitch1.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message        entered
  14.     message     pulse
  15.  
  16.     thing        soundPos0        nolink
  17.     thing        soundPos1        nolink
  18.     thing        soundPos2        nolink
  19.     
  20.     sector      on_sec1         linkID=1
  21.     sector      on_sec2         linkID=1
  22.     
  23.     sector      off_sec1        linkID=0
  24.     sector      off_sec2        linkID=0
  25.  
  26.     sound        enhanced0=sol_ambient01_a.wav   local
  27.     sound        enhanced1=sol_ambient02_a.wav   local
  28.     sound        enhanced2=sol_ambient03_a.wav   local
  29.     sound        enhanced3=sol_ambient04_a.wav   local
  30.     sound        enhanced4=sol_ambient05_a.wav   local
  31.     sound        enhanced5=nub_ambient4_a.wav    local
  32.     
  33.     sound       basic0=nub_ambient1_a.wav   local
  34.     sound       basic1=nub_ambient2_a.wav   local
  35.     sound       basic2=nub_ambient3_a.wav   local
  36.     
  37.     int            sndNum            local
  38.     int            numPos=4        local
  39.     int            count           local
  40.  
  41. end
  42.  
  43. # ========================================================================================
  44.  
  45. code
  46.  
  47. startup:
  48.  
  49.     global4 = 0;
  50.     return;
  51.  
  52. # ========================================================================================
  53.  
  54. entered:
  55.  
  56.     if(GetSenderID() == 1)
  57.     {
  58.         setpulse(2.0);
  59.     }
  60.     
  61.     if(GetSenderID() == 0)
  62.     {
  63.         SetPulse(0.0);
  64.     }
  65.     
  66.     return;
  67.  
  68. # ========================================================================================
  69.  
  70. pulse:
  71.  
  72.     # no commies yet
  73.     if(global4 == 0)
  74.     {
  75.         PlaySoundThing(basic0[RandBetween(0, 2)], soundPos0[RandBetween(0, 2)], 1.0, -1, -1, 0);
  76.     }
  77.     
  78.     # commies are driving around
  79.     else if(global4 == 1)
  80.     {
  81.         PlaySoundThing(enhanced0[RandBetween(0, 5)], soundPos0[RandBetween(0, 2)], 1.0, -1, -1, 0);
  82.     }
  83.     
  84.     return;
  85.  
  86. # ========================================================================================
  87.  
  88. end
  89.